package com.mmt.www.head.member;

import java.util.List;

import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository
public class MemberDao {	
	
	@Autowired
	private SqlSession sqlSession;
	
	/**
	 *  DB에서 회원(가맹점)의 목록을 반환
	 * @param searchCode
	 * @return List<MemberDto>
	 */
	public List<MemberDto> memberSelect(String searchCode){
		
		return sqlSession.selectList("member.memberList", searchCode);
	}
	
	/**
	 * DB에서 회원(가맹점)의 상세정보를 반환받음
	 * @param mart_code
	 * @return MemberDto
	 */
	public MemberDto memberDetail(String mart_code){		
		
		return sqlSession.selectOne("member.memberDetail", mart_code);
	}
}
